package mark.tom.pistols.encryptor.builders;

import java.util.HashMap;
import java.util.Map;

import mark.tom.pistols.algorithm.generator.DESKeyGenerator;
import mark.tom.pistols.encryptor.EncryptKeyGen;

/**
 * @Description: DES算法密钥生成器
 * @Author: ttmk110@163.com
 * @Package: mark.tom.pistols.encryptor.builders
 * @Date: 2020/7/11
 * @Copyright: 版权归 Mark 所有
 * <ModifyLog>
 * @ModifyContent:
 * @Author:
 * @Date: </ModifyLog>
 */
public class DESKeyGen extends EncryptKeyGen {

    @Override
    public Map<String, String> genKey() throws Exception {
        String key = DESKeyGenerator.getKeyByPassword(psw);
        Map<String, String> result = new HashMap<String, String>();
        result.put(PUB_KEY, key);
        result.put(PRI_KEY, key);
        return result;
    }
}
